import { Injectable } from '@angular/core';
import {API_URL_USER} from '../providers/Constants';
import { HttpService } from "./HttpService";


@Injectable()
export class UserService {
  constructor(
    private httpService: HttpService,

  ) { }

  login(user) {
    var url = API_URL_USER+"/login.do";
    return this.httpService.httpPostNoAuth(url, user);
  }
  regiseter(user){

    var url = API_URL_USER+"/register.do"

    return this.httpService.httpPostNoAuth(url,user);
  }
  getUserInfo(id){
    var url = API_URL_USER+"/getUserInfo?id="+id;
    return this.httpService.httpGet(url);
  }



  // GetUserInfo(id:number) {
  //   var url = this.API_URL + "/UserInfo/"+id;
  //   return this.httpService.httpGetWithAuth(url);
  // }
}
